1. Technical Field of the Invention
The invention relates to a method of performing an image processing operation on pixels of one or more images divided into pixels, wherein an image is represented by a series of consecutive runs with runlengths and corresponding pixel values wherein a runlength represents the number of consecutive pixels with mutually identical pixel values and the image processing operation is performed successively on groups of consecutive pixels.
2. Description of Related Art
Image processing operations of this kind include determining a resultant pixel value of a single pixel from the pixel value of a number of pixels. An example of this is a reduction processing of an image in which different pixel values are averaged to give a resultant pixel value. In this case, for example, groups of pixels are successively averaged so that a final image is obtained with less pixels.
Another example of such an image processing operation is combining in some way pixels originating from different images. An example of this is performing an overlay of a first image with a second image, one of the images being regarded as transparent for the other image.
One disadvantage of such image processing operations is the large number of processing steps conventionally required.
An additional problem is that images of pixels are often compressed in order to save memory or transmission capacity. An example of this is a compression based on runlength encoding. Before the image processing operation can then be performed, a compressed image of this kind must first be decompressed. The resultant image after processing must then be re-compressed.
Decompression and compression necessarily require additional processing steps in addition to the large number of steps already required for the image processing operation per se.
U.S. Pat. No. 5,327,248 describes an image processing apparatus in which processing operations are performed on pixels of bitmaps which remain in compressed form where possible. In the U.S. Pat. No. 5,327,248 patent, pixels are grouped in blocks, each block being compressed separately. Only those blocks having pixels to be processed are selected and decompressed. After processing the pixels of a decompressed block, the processed block of pixels is recompressed. Thus, although the U.S. Pat. No. 5,327,248 patent avoids decompressing the entire bitmap, there is nevertheless still a quantity of decompression and compression operations that are necessary, even if less than the prior art.
U.S. Pat. No. 5,444,549 describes an image processing apparatus wherein image data are reduced or subsampled in a direction perpendicular to the image lines by omitting specific image lines. For example, a 1/8 reduction omits every eighth image line. The U.S. Pat. No. 5,444,549 patent makes use of runlength encoding to determine which line should be omitted during the subsampling process. Omitting a line which in fact has the least changes in pixel values with respect to a reference line results in the least amount of information loss. The change in pixel values is, in this case, derived from the runlength of runlength encoded data and the differences therein with respect to preceding reference lines. In this patent, therefore, a runlength encoding process is introduced deliberately and with negative consequence. The disadvantage in the U.S. Pat. No. 5,444,549 patent is that a runlength encoding must be used as a part of the reduction processing, even if the compression resulting from the runlength encoding is not of itself required or desired.